From 59aeae3c8e78bef538dffb91acd29bdaff197456 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 26 Dec 2019 22:59:38 -0500 Subject: [PATCH] testsuite: Remove menu tests Menus are going away. --- testsuite/a11y/menu.txt | 192 --- testsuite/a11y/menu.ui | 132 -- testsuite/a11y/menubutton.ui | 6 +- testsuite/a11y/menus.txt | 133 -- testsuite/a11y/menus.ui | 89 -- testsuite/gtk/builder.c | 130 -- testsuite/gtk/gtkmenu.c | 456 ------ testsuite/gtk/meson.build | 1 - testsuite/reftests/inherit-and-initial.css | 7 - testsuite/reftests/inherit-and-initial.ref.ui | 1395 ----------------- testsuite/reftests/inherit-and-initial.ui | 1233 --------------- testsuite/reftests/meson.build | 3 - 12 files changed, 2 insertions(+), 3775 deletions(-) delete mode 100644 testsuite/a11y/menu.txt delete mode 100644 testsuite/a11y/menu.ui delete mode 100644 testsuite/a11y/menus.txt delete mode 100644 testsuite/a11y/menus.ui delete mode 100644 testsuite/gtk/gtkmenu.c delete mode 100644 testsuite/reftests/inherit-and-initial.css delete mode 100644 testsuite/reftests/inherit-and-initial.ref.ui delete mode 100644 testsuite/reftests/inherit-and-initial.ui diff --git a/testsuite/a11y/menu.txt b/testsuite/a11y/menu.txt deleted file mode 100644 index ec3606f337..0000000000 --- a/testsuite/a11y/menu.txt +++ /dev/null @@ -1,192 +0,0 @@ -window1 - "frame" - index: 0 - state: enabled resizable sensitive showing visible - toolkit: gtk - window-type: normal - - layer: window - alpha: 1 - unnamed-GtkContainerAccessible-0 - "panel" - parent: window1 - state: enabled sensitive showing visible - toolkit: gtk - - layer: widget - alpha: 1 - menubar1 - "menu bar" - parent: window1 - index: 0 - state: enabled sensitive showing visible - toolkit: gtk - - layer: widget - alpha: 1 - - menuitem1 - "menu" - parent: menubar1 - index: 0 - state: enabled selectable sensitive showing visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - - separatormenuitem1 - "separator" - parent: menuitem1 - index: 0 - state: enabled selectable sensitive visible - toolkit: gtk - - layer: popup - alpha: 1 - - - checkmenuitem1 - "check menu item" - parent: menuitem1 - index: 1 - state: selectable sensitive visible indeterminate - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - - separatormenuitem2 - "separator" - parent: menuitem1 - index: 2 - state: enabled selectable sensitive visible - toolkit: gtk - - layer: popup - alpha: 1 - - - imagemenuitem5 - "menu item" - parent: menuitem1 - index: 3 - state: enabled selectable sensitive visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - - menuitem2 - "menu" - parent: menubar1 - index: 1 - state: enabled selectable sensitive showing visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - - imagemenuitem6 - "menu item" - parent: menuitem2 - index: 0 - state: enabled selectable sensitive visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - - imagemenuitem7 - "menu item" - parent: menuitem2 - index: 1 - state: enabled selectable sensitive visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - - imagemenuitem8 - "menu item" - parent: menuitem2 - index: 2 - state: enabled selectable sensitive visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - - imagemenuitem9 - "menu item" - parent: menuitem2 - index: 3 - state: enabled selectable sensitive visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - - menuitem3 - "menu item" - parent: menubar1 - index: 2 - state: enabled selectable sensitive showing visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - - menuitem4 - "menu" - parent: menubar1 - index: 3 - state: enabled selectable sensitive showing visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - - imagemenuitem10 - "menu item" - parent: menuitem4 - index: 0 - state: enabled selectable sensitive visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - diff --git a/testsuite/a11y/menu.ui b/testsuite/a11y/menu.ui deleted file mode 100644 index 19d2c31568..0000000000 --- a/testsuite/a11y/menu.ui +++ /dev/null @@ -1,132 +0,0 @@ - - - - - False - - - True - False - - - True - False - _File - True - - - True - False - - - True - False - - - - - True - False - awesome - True - True - - - - - True - False - - - - - _Quit - True - False - True - - - - - - - - - True - False - _Edit - True - - - True - False - - - Cu_t - True - False - True - - - - - _Copy - True - False - True - - - - - _Paste - True - False - True - - - - - _Delete - True - False - True - - - - - - - - - True - False - _View - True - - - - - True - False - _Help - True - - - True - False - - - _About - True - False - True - - - - - - - - - - diff --git a/testsuite/a11y/menubutton.ui b/testsuite/a11y/menubutton.ui index 576a9c6101..eb7d509d73 100644 --- a/testsuite/a11y/menubutton.ui +++ b/testsuite/a11y/menubutton.ui @@ -1,14 +1,12 @@ - + True - False - + _New True - False True diff --git a/testsuite/a11y/menus.txt b/testsuite/a11y/menus.txt deleted file mode 100644 index ab89b99250..0000000000 --- a/testsuite/a11y/menus.txt +++ /dev/null @@ -1,133 +0,0 @@ -window1 - "frame" - index: 0 - state: enabled resizable sensitive showing visible - toolkit: gtk - window-type: normal - - layer: window - alpha: 1 - unnamed-GtkContainerAccessible-0 - "panel" - parent: window1 - state: enabled sensitive showing visible - toolkit: gtk - - layer: widget - alpha: 1 - menubar1 - "menu bar" - parent: window1 - index: 0 - state: enabled sensitive showing visible - toolkit: gtk - - layer: widget - alpha: 1 - - menuitem1 - "menu" - parent: menubar1 - index: 0 - state: enabled selectable sensitive showing visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - - menuitema1 - "menu item" - parent: menuitem1 - index: 0 - state: enabled selectable sensitive visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - - menuitema2 - "menu item" - parent: menuitem1 - index: 1 - state: enabled selectable sensitive visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - - separatormenuitem1 - "separator" - parent: menuitem1 - index: 2 - state: enabled selectable sensitive visible - toolkit: gtk - - layer: popup - alpha: 1 - - - menuitem3 - "check menu item" - parent: menuitem1 - index: 3 - state: enabled selectable sensitive visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - - menuitem2 - "menu" - parent: menubar1 - index: 1 - state: enabled selectable sensitive showing visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - - menuitem4 - "radio menu item" - parent: menuitem2 - index: 0 - member-of: menuitem5 - menuitem4 - state: enabled selectable sensitive visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - - menuitem5 - "radio menu item" - parent: menuitem2 - index: 1 - member-of: menuitem5 - menuitem4 - state: enabled selectable sensitive visible - toolkit: gtk - - layer: popup - alpha: 1 - - action 0 name: click - action 0 description: Clicks the menuitem - diff --git a/testsuite/a11y/menus.ui b/testsuite/a11y/menus.ui deleted file mode 100644 index 81b55f3bd4..0000000000 --- a/testsuite/a11y/menus.ui +++ /dev/null @@ -1,89 +0,0 @@ - - - - - False - - - True - False - - - True - False - _File - True - - - True - False - - - _New - True - False - True - - - - - bla - True - False - - - - - True - False - - - - - True - False - check item - True - - - - - - - - - True - False - _Edit - True - - - True - False - - - True - False - radio1 - True - True - - - - - True - False - radio2 - True - True - menuitem4 - - - - - - - - - - diff --git a/testsuite/gtk/builder.c b/testsuite/gtk/builder.c index fc774a9b1c..645f86bb03 100644 --- a/testsuite/gtk/builder.c +++ b/testsuite/gtk/builder.c @@ -648,7 +648,6 @@ test_types (void) " " " " " " - " " " " " " " " @@ -1990,134 +1989,6 @@ test_add_objects (void) g_object_unref (builder); } -static GtkWidget * -get_parent_menubar (GtkWidget *menuitem) -{ - GtkMenuShell *menu_shell; - GtkWidget *attach = NULL; - - menu_shell = GTK_MENU_SHELL (gtk_widget_get_ancestor (menuitem, GTK_TYPE_MENU_SHELL)); - - g_assert (GTK_IS_MENU_SHELL (menu_shell)); - - while (menu_shell && !GTK_IS_MENU_BAR (menu_shell)) - { - if (GTK_IS_MENU (menu_shell) && - (attach = gtk_menu_get_attach_widget (GTK_MENU (menu_shell))) != NULL) - menu_shell = GTK_MENU_SHELL (gtk_widget_get_ancestor (attach, GTK_TYPE_MENU_SHELL)); - else - menu_shell = NULL; - } - - return menu_shell ? GTK_WIDGET (menu_shell) : NULL; -} - -static void -test_menus (void) -{ - const gchar *buffer = - "" - " " - " " - " " - " " - " " - " " - " True" - " vertical" - " " - " " - " True" - " " - " " - " True" - " _File" - " True" - " " - " " - " True" - " " - " " - " gtk-new" - " True" - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - " " - "" - ""; - - const gchar *buffer1 = - "" - " " - " " - " " - " " - " " - " " - " True" - " vertical" - " " - " " - " True" - " " - " " - " True" - " " - " " - " True" - " a label" - " " - " " - " " - " " - " " - " " - " " - " " - " " - "" - ""; - GtkBuilder *builder; - GtkWidget *window, *item; - GtkWidget *custom; - - /* Check that the item has the correct accel label string set - */ - builder = builder_new_from_string (buffer, -1, NULL); - window = (GtkWidget *)gtk_builder_get_object (builder, "window1"); - item = (GtkWidget *)gtk_builder_get_object (builder, "imagemenuitem1"); - - gtk_widget_show (window); - - /* Check the menu hierarchy worked here */ - g_assert (get_parent_menubar (item)); - - gtk_widget_destroy (GTK_WIDGET (window)); - g_object_unref (builder); - - - /* Check that we can add alien children to menu items via normal - * GtkContainer apis. - */ - builder = builder_new_from_string (buffer1, -1, NULL); - window = (GtkWidget *)gtk_builder_get_object (builder, "window1"); - item = (GtkWidget *)gtk_builder_get_object (builder, "imagemenuitem1"); - custom = (GtkWidget *)gtk_builder_get_object (builder, "custom1"); - - g_assert (gtk_widget_get_parent (custom) == item); - - gtk_widget_destroy (GTK_WIDGET (window)); - g_object_unref (builder); -} - static void test_file (const gchar *filename) { @@ -2683,7 +2554,6 @@ main (int argc, char **argv) g_test_add_func ("/Builder/PangoAttributes", test_pango_attributes); g_test_add_func ("/Builder/Requires", test_requires); g_test_add_func ("/Builder/AddObjects", test_add_objects); - g_test_add_func ("/Builder/Menus", test_menus); g_test_add_func ("/Builder/MessageArea", test_message_area); g_test_add_func ("/Builder/MessageDialog", test_message_dialog); g_test_add_func ("/Builder/GMenu", test_gmenu); diff --git a/testsuite/gtk/gtkmenu.c b/testsuite/gtk/gtkmenu.c deleted file mode 100644 index 589576c6d8..0000000000 --- a/testsuite/gtk/gtkmenu.c +++ /dev/null @@ -1,456 +0,0 @@ -#include - -/* TestItem {{{1 */ - -/* This utility struct is used by both the RandomMenu and MirrorMenu - * class implementations below. - */ -typedef struct { - GHashTable *attributes; - GHashTable *links; -} TestItem; - -static TestItem * -test_item_new (GHashTable *attributes, - GHashTable *links) -{ - TestItem *item; - - item = g_slice_new (TestItem); - item->attributes = g_hash_table_ref (attributes); - item->links = g_hash_table_ref (links); - - return item; -} - -static void -test_item_free (gpointer data) -{ - TestItem *item = data; - - g_hash_table_unref (item->attributes); - g_hash_table_unref (item->links); - - g_slice_free (TestItem, item); -} - -/* RandomMenu {{{1 */ -#define MAX_ITEMS 10 -#define TOP_ORDER 4 - -typedef struct { - GMenuModel parent_instance; - - GSequence *items; - gint order; -} RandomMenu; - -typedef GMenuModelClass RandomMenuClass; - -static GType random_menu_get_type (void); -G_DEFINE_TYPE (RandomMenu, random_menu, G_TYPE_MENU_MODEL); - -static gboolean -random_menu_is_mutable (GMenuModel *model) -{ - return TRUE; -} - -static gint -random_menu_get_n_items (GMenuModel *model) -{ - RandomMenu *menu = (RandomMenu *) model; - - return g_sequence_get_length (menu->items); -} - -static void -random_menu_get_item_attributes (GMenuModel *model, - gint position, - GHashTable **table) -{ - RandomMenu *menu = (RandomMenu *) model; - TestItem *item; - - item = g_sequence_get (g_sequence_get_iter_at_pos (menu->items, position)); - *table = g_hash_table_ref (item->attributes); -} - -static void -random_menu_get_item_links (GMenuModel *model, - gint position, - GHashTable **table) -{ - RandomMenu *menu = (RandomMenu *) model; - TestItem *item; - - item = g_sequence_get (g_sequence_get_iter_at_pos (menu->items, position)); - *table = g_hash_table_ref (item->links); -} - -static void -random_menu_finalize (GObject *object) -{ - RandomMenu *menu = (RandomMenu *) object; - - g_sequence_free (menu->items); - - G_OBJECT_CLASS (random_menu_parent_class) - ->finalize (object); -} - -static void -random_menu_init (RandomMenu *menu) -{ -} - -static void -random_menu_class_init (GMenuModelClass *class) -{ - GObjectClass *object_class = G_OBJECT_CLASS (class); - - class->is_mutable = random_menu_is_mutable; - class->get_n_items = random_menu_get_n_items; - class->get_item_attributes = random_menu_get_item_attributes; - class->get_item_links = random_menu_get_item_links; - - object_class->finalize = random_menu_finalize; -} - -static RandomMenu * random_menu_new (GRand *rand, gint order); - -static void -random_menu_change (RandomMenu *menu, - GRand *rand) -{ - gint position, removes, adds; - GSequenceIter *point; - gint n_items; - gint i; - - n_items = g_sequence_get_length (menu->items); - - do - { - position = g_rand_int_range (rand, 0, n_items + 1); - removes = g_rand_int_range (rand, 0, n_items - position + 1); - adds = g_rand_int_range (rand, 0, MAX_ITEMS - (n_items - removes) + 1); - } - while (removes == 0 && adds == 0); - - point = g_sequence_get_iter_at_pos (menu->items, position + removes); - - if (removes) - { - GSequenceIter *start; - - start = g_sequence_get_iter_at_pos (menu->items, position); - g_sequence_remove_range (start, point); - } - - for (i = 0; i < adds; i++) - { - const gchar *label; - GHashTable *links; - GHashTable *attributes; - - attributes = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_variant_unref); - links = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_object_unref); - - if (menu->order > 0 && g_rand_boolean (rand)) - { - RandomMenu *child; - const gchar *subtype; - - child = random_menu_new (rand, menu->order - 1); - - if (g_rand_boolean (rand)) - { - subtype = G_MENU_LINK_SECTION; - /* label some section headers */ - if (g_rand_boolean (rand)) - label = "Section"; - else - label = NULL; - } - else - { - /* label all submenus */ - subtype = G_MENU_LINK_SUBMENU; - label = "Submenu"; - } - - g_hash_table_insert (links, g_strdup (subtype), child); - } - else - /* label all terminals */ - label = "Menu Item"; - - if (label) - g_hash_table_insert (attributes, g_strdup ("label"), g_variant_ref_sink (g_variant_new_string (label))); - - g_sequence_insert_before (point, test_item_new (attributes, links)); - g_hash_table_unref (links); - g_hash_table_unref (attributes); - } - - g_menu_model_items_changed (G_MENU_MODEL (menu), position, removes, adds); -} - -static RandomMenu * -random_menu_new (GRand *rand, - gint order) -{ - RandomMenu *menu; - - menu = g_object_new (random_menu_get_type (), NULL); - menu->items = g_sequence_new (test_item_free); - menu->order = order; - - random_menu_change (menu, rand); - - return menu; -} - -/* Test cases {{{1 */ - -static void assert_menu_equality (GtkContainer *container, GMenuModel *model); - -static const gchar * -get_label (GtkMenuItem *item) -{ - GList *children = gtk_container_get_children (GTK_CONTAINER (item)); - const gchar *label = NULL; - - while (children) - { - if (GTK_IS_CONTAINER (children->data)) - children = g_list_concat (children, gtk_container_get_children (children->data)); - else if (GTK_IS_LABEL (children->data)) - label = gtk_label_get_text (children->data); - else if (GTK_IS_ACCEL_LABEL (children->data)) - label = gtk_accel_label_get_label (children->data); - - children = g_list_delete_link (children, children); - } - - return label; -} - -/* a bit complicated with the separators... - * - * with_separators are if subsections of this GMenuModel should have - * separators inserted between them (ie: in the same sense as the - * 'with_separators' argument to gtk_menu_shell_bind_model(). - * - * needs_separator is true if this particular section needs to have a - * separator before it in the case that it is non-empty. this will be - * defined for all subsections of a with_separators menu (except the - * first) or in case section_header is non-%NULL. - * - * section_header is the label that must be inside that separator, if it - * exists. section_header is only non-%NULL if needs_separator is also - * TRUE. - */ -static void -assert_section_equality (GSList **children, - gboolean with_separators, - gboolean needs_separator, - const gchar *section_header, - GMenuModel *model) -{ - gboolean has_separator; - GSList *our_children; - gint i, n; - - /* Assuming that we have the possibility of showing a separator, there - * are two valid situations: - * - * - we have a separator and we have other children - * - * - we have no separator and no children - * - * If we see a separator, we suppose that it is ours and that we will - * encounter children. In the case that we have no children, the - * separator may not be ours but may rather belong to a later section. - * - * We therefore keep our own copy of the children GSList. If we - * encounter children, we will delete the links that this section is - * responsible for and update the pass-by-reference value. Otherwise, - * we will leave everything alone and let the separator be accounted - * for by a following section. - */ - our_children = *children; - if (needs_separator && GTK_IS_SEPARATOR_MENU_ITEM (our_children->data)) - { - /* We accounted for the separator, at least for now, so remove it - * from the list. - * - * We will check later if we should have actually had a separator - * and compare the result to has_separator. - */ - our_children = our_children->next; - has_separator = TRUE; - } - else - has_separator = FALSE; - - /* Now, iterate the model checking that the items in the GSList line - * up with our expectations. */ - n = g_menu_model_get_n_items (model); - for (i = 0; i < n; i++) - { - GMenuModel *subsection; - GMenuModel *submenu; - gchar *label = NULL; - - subsection = g_menu_model_get_item_link (model, i, G_MENU_LINK_SECTION); - submenu = g_menu_model_get_item_link (model, i, G_MENU_LINK_SUBMENU); - g_menu_model_get_item_attribute (model, i, G_MENU_ATTRIBUTE_LABEL, "s", &label); - - if (subsection) - { - g_assert (!submenu); - assert_section_equality (&our_children, - FALSE, /* with_separators */ - label || (with_separators && i > 0), /* needs_separator */ - label, /* section_header */ - subsection); - g_object_unref (subsection); - } - else - { - GtkWidget *submenu_widget; - GtkMenuItem *item; - - /* This is a normal item. Make sure the label is right. */ - item = our_children->data; - our_children = g_slist_remove (our_children, item); - - /* get_label() returns "" when it ought to return NULL */ - g_assert_cmpstr (get_label (item), ==, label ? label : ""); - submenu_widget = gtk_menu_item_get_submenu (item); - - if (submenu) - { - g_assert (submenu_widget != NULL); - assert_menu_equality (GTK_CONTAINER (submenu_widget), submenu); - g_object_unref (submenu); - } - else - g_assert (!submenu_widget); - } - - g_free (label); - } - - /* If we found a separator but visited no children then the separator - * was not for us. Patch that up. - */ - if (has_separator && our_children == (*children)->next) - { - /* Rewind our_children to put the separator we tentatively - * consumed back into the list. - */ - our_children = *children; - has_separator = FALSE; - } - - if (our_children == *children) - /* If we had no children then we didn't really need a separator. */ - needs_separator = FALSE; - - g_assert (needs_separator == has_separator); - - if (has_separator) - { - GtkWidget *contents; - const gchar *label; - - /* We needed and had a separator and we visited a child. - * - * Make sure that separator was valid. - */ - contents = gtk_bin_get_child ((*children)->data); - if (GTK_IS_LABEL (contents)) - label = gtk_label_get_label (GTK_LABEL (contents)); - else if (GTK_IS_ACCEL_LABEL (contents)) - label = gtk_accel_label_get_label (GTK_ACCEL_LABEL (contents)); - else - label = ""; - - /* get_label() returns "" when it ought to return NULL */ - g_assert_cmpstr (label, ==, section_header ? section_header : ""); - - /* our_children has already gone (possibly far) past *children, so - * we need to free up the link that we left behind for the - * separator in case we wanted to rewind. - */ - g_slist_free_1 (*children); - } - - *children = our_children; -} - -/* We want to use a GSList here instead of a GList because the ->prev - * pointer updates cause trouble with the way we speculatively deal with - * separators by skipping over them and coming back to clean up later. - */ -static void -get_children_into_slist (GtkWidget *widget, - gpointer user_data) -{ - GSList **list_ptr = user_data; - - *list_ptr = g_slist_prepend (*list_ptr, widget); -} - -static void -assert_menu_equality (GtkContainer *container, - GMenuModel *model) -{ - GSList *children = NULL; - - gtk_container_foreach (container, get_children_into_slist, &children); - children = g_slist_reverse (children); - - assert_section_equality (&children, TRUE, FALSE, NULL, model); - g_assert (children == NULL); -} - -static void -test_bind_menu (void) -{ - RandomMenu *model; - GtkWidget *menu; - GRand *rand; - gint i; - - gtk_init (); - - rand = g_rand_new_with_seed (g_test_rand_int ()); - model = random_menu_new (rand, TOP_ORDER); - menu = gtk_menu_new_from_model (G_MENU_MODEL (model)); - g_object_ref_sink (menu); - assert_menu_equality (GTK_CONTAINER (menu), G_MENU_MODEL (model)); - for (i = 0; i < 100; i++) - { - random_menu_change (model, rand); - while (g_main_context_iteration (NULL, FALSE)); - assert_menu_equality (GTK_CONTAINER (menu), G_MENU_MODEL (model)); - } - g_object_unref (model); - g_object_unref (menu); - g_rand_free (rand); -} -/* Epilogue {{{1 */ -int -main (int argc, char **argv) -{ - g_test_init (&argc, &argv, NULL); - - g_test_add_func ("/gmenu/bind", test_bind_menu); - - return g_test_run (); -} -/* vim:set foldmethod=marker: */ diff --git a/testsuite/gtk/meson.build b/testsuite/gtk/meson.build index b02d3f51ce..2b5db62892 100644 --- a/testsuite/gtk/meson.build +++ b/testsuite/gtk/meson.build @@ -34,7 +34,6 @@ tests = [ ['gestures'], ['grid'], ['grid-layout'], - ['gtkmenu'], ['icontheme'], ['keyhash', ['../../gtk/gtkkeyhash.c', gtkresources, '../../gtk/gtkprivate.c'], gtk_cargs], ['listbox'], diff --git a/testsuite/reftests/inherit-and-initial.css b/testsuite/reftests/inherit-and-initial.css deleted file mode 100644 index ab442e9b46..0000000000 --- a/testsuite/reftests/inherit-and-initial.css +++ /dev/null @@ -1,7 +0,0 @@ -* { - all: initial; -} - -#inherit { - all: inherit; -} diff --git a/testsuite/reftests/inherit-and-initial.ref.ui b/testsuite/reftests/inherit-and-initial.ref.ui deleted file mode 100644 index bf193f0fb1..0000000000 --- a/testsuite/reftests/inherit-and-initial.ref.ui +++ /dev/null @@ -1,1395 +0,0 @@ - - - - 100 - 50 - 1 - 10 - - - 1000 - 1 - 42 - 1 - 10 - - - - - - - - - - True - Andrea - Cimi - - - False - Otto - chaotic - - - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. -Nullam fringilla, est ut feugiat ultrices, elit lacus ultricies nibh, id commodo tortor nisi id elit. -Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. -Morbi vel elit erat. Maecenas dignissim, dui et pharetra rutrum, tellus lectus rutrum mi, a convallis libero nisi quis tellus. -Nulla facilisi. Nullam eleifend lobortis nisl, in porttitor tellus malesuada vitae. -Aenean lacus tellus, pellentesque quis molestie quis, fringilla in arcu. -Duis elementum, tellus sed tristique semper, metus metus accumsan augue, et porttitor augue orci a libero. -Ut sed justo ac felis placerat laoreet sed id sem. Proin mattis tincidunt odio vitae tristique. -Morbi massa libero, congue vitae scelerisque vel, ultricies vel nisl. -Vestibulum in tortor diam, quis aliquet quam. Praesent ut justo neque, tempus rutrum est. -Duis eu lectus quam. Vivamus eget metus a mauris molestie venenatis pulvinar eleifend nisi. -Nulla facilisi. Pellentesque at dolor sit amet purus dapibus pulvinar molestie quis neque. -Suspendisse feugiat quam quis dolor accumsan cursus. - - - - popup - - - inherit - vertical - - - inherit - - - inherit - _File - 1 - - - inherit - - - _New - inherit - 1 - - - - - _Open - inherit - 1 - - - - - _Save - inherit - 1 - - - - - Save _As - inherit - 1 - - - - - inherit - - - - - _Quit - inherit - 1 - - - - - - - - - inherit - _Edit - 1 - - - inherit - - - Cu_t - inherit - 1 - 1 - - - - - _Copy - inherit - 1 - - - - - _Paste - inherit - 1 - - - - - _Delete - inherit - 1 - - - - - Checks & Radios - inherit - 1 - - - inherit - - - _Check - 1 - inherit - 1 - - - - - _Check - 1 - inherit - 0 - 1 - - - - - _Check - inherit - 1 - 1 - - - - - _Check - inherit - 1 - - - - - _Check - inherit - 0 - 1 - - - - - _Check - inherit - 1 - 0 - 1 - - - - - inherit - - - - - _Radio - 1 - inherit - 1 - - - - - _Radio - 1 - inherit - 0 - 1 - - - - - _Radio - inherit - 1 - 1 - - - - - _Radio - inherit - 1 - - - - - _Radio - inherit - 0 - 1 - - - - - _Radio - inherit - 1 - 0 - 1 - - - - - - - - - - - - - inherit - _View - 1 - - - inherit - - - _Dark theme - inherit - 1 - - - - - - - - - inherit - _Help - 1 - - - inherit - - - _About - inherit - 1 - - - - - - - - - - - inherit - - - - 1 - inherit - Save - 1 - document-save - - - - - 1 - inherit - Open - 1 - document-open - - - - - 1 - inherit - - - - - 1 - inherit - Find - 1 - edit-find - - - - - 1 - inherit - - - - - - - - inherit - - - inherit - 1 - • - search... - - - - - - - - - inherit - 6 - - - inherit - vertical - 4 - - - inherit - 1 - - - comboboxentry - - - - - - - inherit - 0 - 1 - - - • - comboboxentry - - - - - - - inherit - 1 - • - entry - - - - - inherit - 0 - 1 - • - entry - - - - - inherit - 20 - - - inherit - label - - - - - inherit - 0 - label - - - - - inherit - 1 - adjustment2 - - - - - inherit - 1 - - - - - - - inherit - 1 - - - checkbutton - inherit - 1 - 1 - - 0 - 0 - - - - - - checkbutton - inherit - 1 - - 0 - 1 - - - - - - checkbutton - inherit - 1 - 1 - - 0 - 2 - - - - - - checkbutton - inherit - 0 - 1 - 1 - - 0 - 3 - - - - - - checkbutton - inherit - 0 - 1 - - 0 - 4 - - - - - - checkbutton - inherit - 0 - 1 - 1 - - 0 - 5 - - - - - - radiobutton - inherit - 1 - 1 - - 1 - 0 - - - - - - radiobutton - inherit - 1 - 1 - radiobutton1 - - 1 - 1 - - - - - - radiobutton - inherit - 1 - 1 - 1 - radiobutton1 - - 1 - 2 - - - - - - radiobutton - inherit - 0 - 1 - 1 - - 1 - 3 - - - - - - radiobutton - inherit - 0 - 1 - 1 - radiobutton3 - - 1 - 4 - - - - - - radiobutton - inherit - 0 - 1 - 1 - 1 - radiobutton3 - - 1 - 5 - - - - - - inherit - - 0 - 6 - - - - - - inherit - 0 - - 1 - 6 - - - - - - - - - - inherit - vertical - - - - - 110 - inherit - vertical - 4 - - - togglebutton - inherit - 1 - 1 - - - - - togglebutton - inherit - 0 - 1 - 1 - - - - - togglebutton - inherit - 1 - 1 - 1 - - - - - togglebutton - inherit - 0 - 1 - 1 - 1 - - - - - inherit - liststore1 - 0 - - - - 2 - - - - - - - inherit - 0 - liststore1 - 1 - - - - 2 - - - - - - - inherit - 1 - 1 - - - - - inherit - 1 - 1 - #31316867a09f - - - - - inherit - - - - - - - inherit - vertical - - - - - inherit - vertical - 4 - - - inherit - vertical - 8 - 1 - - - inherit - 0.5 - - - - - inherit - 0.5 - 1 - - - - - - - inherit - - - inherit - 1 - vertical - 1 - - - inherit - 1 - adjustment1 - 0 - 75 - 0 - - - - - inherit - 0 - 1 - adjustment1 - 0 - 75 - 0 - - - - - - - - - inherit - 1 - - - inherit - 1 - 4 - - - inherit - vertical - 0.5 - - - - - inherit - vertical - 0.5 - 1 - - - - - - - inherit - 1 - 4 - - - 100 - inherit - 1 - vertical - adjustment1 - 0 - 75 - 0 - - - - - 100 - inherit - 0 - 1 - vertical - adjustment1 - 0 - 75 - 0 - - - - - - - - - inherit - vertical - - - inherit - - - link button - inherit - 1 - 1 - 1 - none - http://www.gtk.org - - - - - - - inherit - 1 - - - inherit - 1 - in - - - inherit - - - inherit - Lorem ipsum dolor sit amet, consectetur adipiscing elit. -Nullam fringilla, est ut feugiat ultrices, elit lacus ultricies nibh, id commodo tortor nisi id elit. -Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. -Morbi vel elit erat. Maecenas dignissim, dui et pharetra rutrum, tellus lectus rutrum mi, a convallis libero nisi quis tellus. -Nulla facilisi. Nullam eleifend lobortis nisl, in porttitor tellus malesuada vitae. -Aenean lacus tellus, pellentesque quis molestie quis, fringilla in arcu. -Duis elementum, tellus sed tristique semper, metus metus accumsan augue, et porttitor augue orci a libero. -Ut sed justo ac felis placerat laoreet sed id sem. Proin mattis tincidunt odio vitae tristique. -Morbi massa libero, congue vitae scelerisque vel, ultricies vel nisl. -Vestibulum in tortor diam, quis aliquet quam. Praesent ut justo neque, tempus rutrum est. -Duis eu lectus quam. Vivamus eget metus a mauris molestie venenatis pulvinar eleifend nisi. -Nulla facilisi. Pellentesque at dolor sit amet purus dapibus pulvinar molestie quis neque. -Suspendisse feugiat quam quis dolor accumsan cursus. - - - - - - - - - inherit - expander - - - - - - - - - - - inherit - vertical - - - - - inherit - vertical - 1 - - - inherit - in - - - inherit - 12 - - - - - - - - inherit - <b>In</b> - 1 - - - - - - - inherit - out - - - inherit - 12 - - - - - - - - inherit - <b>Out</b> - 1 - - - - - - - inherit - - - inherit - 12 - - - - - - - - inherit - <b>Etched out</b> - 1 - - - - - - - inherit - etched-out - - - inherit - 12 - - - - - - - - inherit - <b>Etched out</b> - 1 - - - - - - - - - inherit - vertical - - - - - inherit - vertical - 4 - - - 150 - inherit - 1 - always - in - - - inherit - 1 - liststore1 - 0 - 0 - - - - - - Cool - - - - 0 - - - - - - - Name - - - - 1 - - - - - - - Nick - - - - 2 - - - - - - - - - - - inherit - 1 - in - - - inherit - 1 - textbuffer1 - - - - - - - - - - - inherit - - - - - inherit - 5 - 5 - 5 - 10 - 1 - - - inherit - 1 - - - - - inherit - vertical - - - - - - - - inherit - page 1 - - - - - - - 1 - - - inherit - vertical - - - - - - - - inherit - page 2 - - - - - - - 2 - - - inherit - vertical - - - - - - - - inherit - page 3 - - - - - - - - - inherit - 1 - right - - - - - inherit - vertical - - - - - - - - inherit - page 1 - - - - - - - 1 - - - inherit - vertical - - - - - - - - inherit - page 2 - - - - - - - 2 - - - inherit - vertical - - - - - - - - inherit - page 3 - - - - - - - - - inherit - 1 - bottom - - - - - inherit - vertical - - - - - - - - inherit - page 1 - - - - - - - 1 - - - inherit - vertical - - - - - - - - inherit - page 2 - - - - - - - 2 - - - inherit - vertical - - - - - - - - inherit - page 3 - - - - - - - - - inherit - 1 - left - - - - - inherit - vertical - - - - - - - - inherit - page 1 - - - - - - - 1 - - - inherit - vertical - - - - - - - - inherit - page 2 - - - - - - - 2 - - - inherit - vertical - - - - - - - - inherit - page 3 - - - - - - - - - - - inherit - - - - - - - - - diff --git a/testsuite/reftests/inherit-and-initial.ui b/testsuite/reftests/inherit-and-initial.ui deleted file mode 100644 index 9a587ea907..0000000000 --- a/testsuite/reftests/inherit-and-initial.ui +++ /dev/null @@ -1,1233 +0,0 @@ - - - - 100 - 50 - 1 - 10 - - - 1000 - 1 - 42 - 1 - 10 - - - - - - - - - - True - Andrea - Cimi - - - False - Otto - chaotic - - - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. -Nullam fringilla, est ut feugiat ultrices, elit lacus ultricies nibh, id commodo tortor nisi id elit. -Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. -Morbi vel elit erat. Maecenas dignissim, dui et pharetra rutrum, tellus lectus rutrum mi, a convallis libero nisi quis tellus. -Nulla facilisi. Nullam eleifend lobortis nisl, in porttitor tellus malesuada vitae. -Aenean lacus tellus, pellentesque quis molestie quis, fringilla in arcu. -Duis elementum, tellus sed tristique semper, metus metus accumsan augue, et porttitor augue orci a libero. -Ut sed justo ac felis placerat laoreet sed id sem. Proin mattis tincidunt odio vitae tristique. -Morbi massa libero, congue vitae scelerisque vel, ultricies vel nisl. -Vestibulum in tortor diam, quis aliquet quam. Praesent ut justo neque, tempus rutrum est. -Duis eu lectus quam. Vivamus eget metus a mauris molestie venenatis pulvinar eleifend nisi. -Nulla facilisi. Pellentesque at dolor sit amet purus dapibus pulvinar molestie quis neque. -Suspendisse feugiat quam quis dolor accumsan cursus. - - - - popup - - - vertical - - - - - _File - 1 - - - - - _New - 1 - - - - - _Open - 1 - - - - - _Save - 1 - - - - - Save _As - 1 - - - - - - - - _Quit - 1 - - - - - - - - - _Edit - 1 - - - - - Cu_t - 1 - 1 - - - - - _Copy - 1 - - - - - _Paste - 1 - - - - - _Delete - 1 - - - - - Checks & Radios - 1 - - - - - _Check - 1 - 1 - - - - - _Check - 1 - 0 - 1 - - - - - _Check - 1 - 1 - - - - - _Check - 1 - - - - - _Check - 0 - 1 - - - - - _Check - 1 - 0 - 1 - - - - - - - - _Radio - 1 - 1 - - - - - _Radio - 1 - 0 - 1 - - - - - _Radio - 1 - 1 - - - - - _Radio - 1 - - - - - _Radio - 0 - 1 - - - - - _Radio - 1 - 0 - 1 - - - - - - - - - - - - - _View - 1 - - - - - _Dark theme - 1 - - - - - - - - - _Help - 1 - - - - - _About - 1 - - - - - - - - - - - - - - 1 - Save - 1 - document-save - - - - - 1 - Open - 1 - document-open - - - - - 1 - - - - - 1 - Find - 1 - edit-find - - - - - 1 - - - - - - - - - - 1 - • - search... - - - - - - - - - 6 - - - vertical - 4 - - - 1 - - - comboboxentry - - - - - - - 0 - 1 - - - • - comboboxentry - - - - - - - 1 - • - entry - - - - - 0 - 1 - • - entry - - - - - 20 - - - label - - - - - 0 - label - - - - - 1 - adjustment2 - - - - - 1 - - - - - - - 1 - - - checkbutton - 1 - 1 - - 0 - 0 - - - - - - checkbutton - 1 - - 0 - 1 - - - - - - checkbutton - 1 - 1 - - 0 - 2 - - - - - - checkbutton - 0 - 1 - 1 - - 0 - 3 - - - - - - checkbutton - 0 - 1 - - 0 - 4 - - - - - - checkbutton - 0 - 1 - 1 - - 0 - 5 - - - - - - radiobutton - 1 - 1 - - 1 - 0 - - - - - - radiobutton - 1 - 1 - radiobutton1 - - 1 - 1 - - - - - - radiobutton - 1 - 1 - 1 - radiobutton1 - - 1 - 2 - - - - - - radiobutton - 0 - 1 - 1 - - 1 - 3 - - - - - - radiobutton - 0 - 1 - 1 - radiobutton3 - - 1 - 4 - - - - - - radiobutton - 0 - 1 - 1 - 1 - radiobutton3 - - 1 - 5 - - - - - - - 0 - 6 - - - - - - 0 - - 1 - 6 - - - - - - - - - - vertical - - - - - 110 - vertical - 4 - - - togglebutton - 1 - 1 - - - - - togglebutton - 0 - 1 - 1 - - - - - togglebutton - 1 - 1 - 1 - - - - - togglebutton - 0 - 1 - 1 - 1 - - - - - liststore1 - 0 - - - - 2 - - - - - - - 0 - liststore1 - 1 - - - - 2 - - - - - - - 1 - 1 - - - - - 1 - 1 - #31316867a09f - - - - - - - - - - vertical - - - - - vertical - 4 - - - vertical - 8 - 1 - - - 0.5 - - - - - 0.5 - 1 - - - - - - - - - 1 - vertical - 1 - - - 1 - adjustment1 - 0 - 75 - 0 - - - - - 0 - 1 - adjustment1 - 0 - 75 - 0 - - - - - - - - - 1 - - - 1 - 4 - - - vertical - 0.5 - - - - - vertical - 0.5 - 1 - - - - - - - 1 - 4 - - - 100 - 1 - vertical - adjustment1 - 0 - 75 - 0 - - - - - 100 - 0 - 1 - vertical - adjustment1 - 0 - 75 - 0 - - - - - - - - - vertical - - - - - link button - 1 - 1 - 1 - none - http://www.gtk.org - - - - - - - 1 - - - 1 - in - - - - - Lorem ipsum dolor sit amet, consectetur adipiscing elit. -Nullam fringilla, est ut feugiat ultrices, elit lacus ultricies nibh, id commodo tortor nisi id elit. -Class aptent taciti sociosqu ad litora torquent per conubia nostra, per inceptos himenaeos. -Morbi vel elit erat. Maecenas dignissim, dui et pharetra rutrum, tellus lectus rutrum mi, a convallis libero nisi quis tellus. -Nulla facilisi. Nullam eleifend lobortis nisl, in porttitor tellus malesuada vitae. -Aenean lacus tellus, pellentesque quis molestie quis, fringilla in arcu. -Duis elementum, tellus sed tristique semper, metus metus accumsan augue, et porttitor augue orci a libero. -Ut sed justo ac felis placerat laoreet sed id sem. Proin mattis tincidunt odio vitae tristique. -Morbi massa libero, congue vitae scelerisque vel, ultricies vel nisl. -Vestibulum in tortor diam, quis aliquet quam. Praesent ut justo neque, tempus rutrum est. -Duis eu lectus quam. Vivamus eget metus a mauris molestie venenatis pulvinar eleifend nisi. -Nulla facilisi. Pellentesque at dolor sit amet purus dapibus pulvinar molestie quis neque. -Suspendisse feugiat quam quis dolor accumsan cursus. - - - - - - - - - expander - - - - - - - - - - - vertical - - - - - vertical - 1 - - - in - - - 12 - - - - - - - - <b>In</b> - 1 - - - - - - - out - - - 12 - - - - - - - - <b>Out</b> - 1 - - - - - - - - - 12 - - - - - - - - <b>Etched out</b> - 1 - - - - - - - etched-out - - - 12 - - - - - - - - <b>Etched out</b> - 1 - - - - - - - - - vertical - - - - - vertical - 4 - - - 150 - 1 - always - in - - - 1 - liststore1 - 0 - 0 - - - - - - Cool - - - - 0 - - - - - - - Name - - - - 1 - - - - - - - Nick - - - - 2 - - - - - - - - - - - 1 - in - - - 1 - textbuffer1 - - - - - - - - - - - - - - 5 - 5 - 5 - 10 - 1 - - - 1 - - - - - vertical - - - - - - - - page 1 - - - - - - - 1 - - - vertical - - - - - - - - page 2 - - - - - - - 2 - - - vertical - - - - - - - - page 3 - - - - - - - - - 1 - right - - - - - vertical - - - - - - - - page 1 - - - - - - - 1 - - - vertical - - - - - - - - page 2 - - - - - - - 2 - - - vertical - - - - - - - - page 3 - - - - - - - - - 1 - bottom - - - - - vertical - - - - - - - - page 1 - - - - - - - 1 - - - vertical - - - - - - - - page 2 - - - - - - - 2 - - - vertical - - - - - - - - page 3 - - - - - - - - - 1 - left - - - - - vertical - - - - - - - - page 1 - - - - - - - 1 - - - vertical - - - - - - - - page 2 - - - - - - - 2 - - - vertical - - - - - - - - page 3 - - - - - - - - - - - - - - - - - - diff --git a/testsuite/reftests/meson.build b/testsuite/reftests/meson.build index cf6042ab1a..da7d10951e 100644 --- a/testsuite/reftests/meson.build +++ b/testsuite/reftests/meson.build @@ -254,9 +254,6 @@ testdata = [ 'image-load-from-file.css', 'image-load-from-file.ref.ui', 'image-load-from-file.ui', - 'inherit-and-initial.css', - 'inherit-and-initial.ref.ui', - 'inherit-and-initial.ui', 'label-attribute-preference.css', 'label-attribute-preference.ref.ui', 'label-attribute-preference.ui', -- 2.30.2